const files = require.context("./", false, /.router.js$/);
import Layout from "../../layout/index.vue";
const routes = [
  {
    path: "/",
    name: "Layout",
    component: Layout,
    children: [],
  },
];

const routeList = [];

files.keys().forEach((key) => {
  routeList.push(files(key).default || {});
});

// 子应用路由注册
const childrenRoutes = [
  {
    path: "commonModule*",
  },
];

routes[0].children = routeList.concat(childrenRoutes);
export default routes;
